package zuoye;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;

public class zuoye05 {
	public static void main(String[] args) {
		int[] arr1={1,2,3};
		int[] arr2={3,4,5,2};
		ArrayList<Integer> list=new ArrayList<>();
		HashMap<Integer, Integer> map=new HashMap<>();
		for(int i=0;i<arr1.length;i++){
			if(map.containsKey(arr1[i])){
				map.put(arr1[i],map.get(arr1[i])+1);
			}else{
				map.put(arr1[i], 1);
			}
		}
		for(int i=0;i<arr2.length;i++){
			if(map.containsKey(arr2[i])){
				map.put(arr2[i],map.get(arr2[i])+1);
			}else{
				map.put(arr2[i], 1);
			}
		}
		Set<Integer> keys=map.keySet();
		for(Integer key:keys){
			if(map.get(key)==1){
				list.add(key);
			}
		}
		System.out.println(list);
	}
}
